var path = require('path');
var ExtractTextPlugin = require("extract-text-webpack-plugin");
module.exports = {
		entry: {
			'cbmode_v1': './src/scripts/cbmode_v1.js',
			'cbmode_v1_flow': './src/scripts/cbmode_v1_flow.js',
			'cbmode_v1_personInfo': './src/scripts/cbmode_v1_personInfo.js'
		},
		output: {
			path: __dirname + '/assets/',
			publicPath: '/assets/',
			filename: 'js/[name].js',
			sourceMapFilename: '[file].map'
		},
		resolve: {
			alias: {
				js: path.join(__dirname, './src/scripts'),
				css: path.join(__dirname, './src/style')
			},
			extensions: ['', '.js', '.css']
		},
		module: {
			loaders: [{
					test: /\.css$/,
					loader: ExtractTextPlugin.extract("style-loader", "css-loader")
				}, {
					test: /\.(png|jpg|gif|eot|woff2|woff|ttf|svg)$/,
					loader: 'url-loader?limit=8192'
				}
			]
		},
		plugins: [
			new ExtractTextPlugin("css/[name].css")
		],
		externals: {
			'jquery': 'jQuery'
		}
	};